package com.hqd.sellrelation.server.controller.Resource;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hqd.common.model.PageParams;
import com.hqd.common.model.ResultBody;
import com.hqd.sellrelation.server.entity.CommunalData;
import com.hqd.sellrelation.server.entity.ResourcePool;
import com.hqd.sellrelation.server.service.ResourcePoolService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/resourcePool")
@Api(value = "ResourcePoolController", tags = "[资源池数据]->资源池数据相关操作")
public class ResourcePoolController {
    @Autowired
    private ResourcePoolService resourcePoolService;

    /**
     * 分页查询资源池信息
     * wx
     */
    @ApiOperation(value = "分页查询资源池信息", notes = "分页查询资源池信息")
    @GetMapping("/getResourcePoolListPage")
    public ResultBody<IPage<ResourcePool>> getResourcePoolListPage(@RequestParam(required = false) Map map) {
        log.info("ResourcePoolController.getResourcePoolListPage -> {}", map);
        return ResultBody.ok().data(resourcePoolService.findListPage(new PageParams(map)));
    }




}

